<template>
  <div class="home-body">
    <div class="first-column">
      <home-stats-overview />
      <home-stats-by-type></home-stats-by-type>
      <home-stats-by-status></home-stats-by-status>
      <home-stats-by-usage></home-stats-by-usage>
    </div>

    <div class="second-column">
      <home-alarm-records></home-alarm-records>
      <home-alarm-by-env></home-alarm-by-env>
    </div>

    <div class="thirdly-column">
      <home-alarm-by-status></home-alarm-by-status>
    </div>

    <div class="fourthly-column">
      <home-energy-stats></home-energy-stats>
      <!-- <div class="card energy-consumption">
        <div class="card-bg energy-consumption-bg">
          <img class="card-top energy-consumption-top" src="../assets/RightBigUp.png" />
          <div class="card-middle energy-consumption-center"></div>
          <img class="card-bottom energy-consumption-bottom" src="../assets/RightBigDown.png" />
        </div>
        <div></div>
      </div> -->

      <home-energy-ranking></home-energy-ranking>
      <!-- <div class="card electricity-overview">
        <div class="card-bg electricity-overview-bg">
          <img class="card-top electricity-overview-top" src="../assets/RightBigUp.png" />
          <div class="card-middle electricity-overview-center"></div>
          <img class="card-bottom electricity-overview-bottom" src="../assets/RightBigDown.png" />
        </div>
        <div></div>
      </div> -->

      <!-- <div class="card water-overview">
        <div class="card-bg water-overview-bg">
          <img class="card-top water-overview-top" src="../assets/RightBigUp.png" />
          <div class="card-middle water-overview-center"></div>
          <img class="card-bottom water-overview-bottom" src="../assets/RightBigDown.png" />
        </div>
        <div></div>
      </div> -->
      <home-water-ranking></home-water-ranking>
    </div>
  </div>
</template>

<script>
import HomeStatsOverview from './HomeStatsOverview.vue';
import HomeStatsByType from './HomeStatsByType.vue';
import HomeStatsByStatus from './HomeStatsByStatus.vue';
import HomeStatsByUsage from './HomeStatsByUsage.vue';
import HomeAlarmRecords from './HomeAlarmRecords.vue';
import HomeAlarmByEnv from './HomeAlarmByEnv.vue';
import HomeAlarmByStatus from './HomeAlarmByStatus.vue';
import HomeEnergyStats from './HomeEnergyStats.vue';
import HomeEnergyRanking from './HomeEnergyRanking.vue';
import HomeWaterRanking from './HomeWaterRanking.vue';

export default {
  components: {
    HomeStatsOverview,
    HomeStatsByType,
    HomeStatsByStatus,
    HomeStatsByUsage,
    HomeAlarmRecords,
    HomeAlarmByEnv,
    HomeAlarmByStatus,
    HomeEnergyStats,
    HomeEnergyRanking,
    HomeWaterRanking,
  },
};
</script>

<style lang="scss" scoped>
.home-body {
  display: flex;
  justify-content: space-between;
  flex-grow: 1;
}

.first-column {
  display: flex;
  flex-direction: column;
  width: 23.438vw;
  justify-content: flex-end;
}

.card {
  position: relative;
}

.card-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-top,
.card-bottom {
  width: 100%;
  min-height: 0;
}

.card-middle {
  background-size: 100%;
  background-repeat: repeat-y;
  flex-grow: 1;
}

.device-overview {
  height: 25.278vh;
  margin-bottom: 1.204vh;
}

.device-overview-center {
  background-image: url("../assets/zhongleftCentre.png");
  height: 13.333vh;
}

.device-statistics {
  height: 25.278vh;
  margin-bottom: 1.204vh;
}

.device-statistics-center {
  background-image: url('../assets/zhongleftCentre.png');
  height: 13.333vh;
}

.equipment-operation {
  height: 25.278vh;
}

.equipment-operation-center {
  background-image: url('../assets/zhongleftCentre.png');
  height: 13.333vh;
}

.second-column{
  width: 23.438vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-left: 2.5vh;
}

.environmental-safety{
  height: 25.278vh;
}

.environmental-safety-center {
  background-image: url('../assets/zhongleftCentre.png');
  height: 13.333vh;
}

.thirdly-column {
  width: 23.438vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-left: 2.5vh;
}

.Alarm-overview {
  height: 25.278vh;
}

.Alarm-overview-center {
  background-image: url('../assets/zhongleftCentre.png');
  height: 13.333vh;
}

.fourthly-column {
  width: 23.438vw;
  display: flex;
  flex-direction: column;
  margin-left: 2.5vh;
  justify-content: flex-end;
}

.energy-consumption {
  height: 28.444vh;
  margin-bottom: 2.037vh;
}

.energy-consumption-center {
  background-image: url('../assets/RightBigCentre.png');
  height: 17.5vh;
}

.electricity-overview {
  height: 28.444vh;
  margin-bottom: 1.852vh;
}

.electricity-overview-center {
  background-image: url('../assets/RightBigCentre.png');
  height: 17.5vh;
}

.water-overview {
  height: 28.444vh;
}

.water-overview-center {
  background-image: url('../assets/RightBigCentre.png');
  height: 17.5vh;
}
</style>
